using PhillyCodeCamp.Domain.Validation;
using PhillyCodeCamp.DTO;
using PhillyCodeCamp.Services;

namespace PhillyCodeCampSpecs.Helpers
{
    public class StubValidatorService : IValidationService
    {
        private readonly bool _setWithValidInputs;

        public StubValidatorService(bool setWithValidInputs)
        {
            _setWithValidInputs = setWithValidInputs;
        }

        public IBusinessRuleSet Validate(TaxDataDTO dto)
        {
            if (_setWithValidInputs) return new BusinessRuleSet<TaxDataDTO>();

            return new BusinessRuleSet<TaxDataDTO>(new BusinessRule<TaxDataDTO>("", "", null));
        }
    }
}